package RMI;

import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;

import javax.swing.JFrame;
import javax.swing.text.AbstractDocument.Content;


public class Client {
	
	
	
	
	public static void main(String[] args) {
		String host = null; // corresponds to "127.0.0.1" and "localhost"
		try {
			
			
			Registry registry = LocateRegistry.getRegistry(host);
			Chat stub = (Chat) registry.lookup("chat");
			
//			stub.sendMessage(s);
			System.out.println(stub.reviveMessage());
						
			
		} catch (Exception e) {
			System.err.println("Client exception: " + e.toString());
			e.printStackTrace();
		}
	}
}